#!/bin/bash

src=$1
dst=$2

function log() {
    echo "$*"
}

[ -e $src ] || {
    log "$src not exist, exit"
    exit 1
}

[ -d $dst ] || {
    log "mkdir $dst"
    mkdir -p $dst
}

sudo mount -o nobrowse,rw -t ntfs $src $dst
ret=$?
[ $ret -gt 0 ] && {
    log "Error: mount failed $ret"
    exit $ret
}

log "mount $src to $dst Success!"
exit 0

